1. Field of the Invention
This invention relates to an apparatus and method for generating a modulo address and, more particularly, to an apparatus and method for generating a modulo address used to access a circular buffer.
2. Related Art
The general concept of using modulo address generation to address a circular buffer is well-known. Commonly, a circular buffer has a predetermined length L. In a conventional circular buffer, a next address for accessing the circular buffer is generated by adding an offset M to a current address A. As successive offsets M are added, a resulting address will eventually exceed the address of the highest location in the circular buffer. When this occurs, modulo addressing causes the resulting address to automatically "wrap" back to the beginning of the circular buffer. In a similar manner, if the offset M is negative, a resulting address will eventually be less than the address of a lowest location of the circular buffer. In this case, modulo addressing will cause the address to "wrap"to the end of the buffer.
Modulo address generation is often implemented using software. Software generation of addresses, however, is slow and does not work well for certain types of applications, such as digital signal processing, which requires fast address generation. Modulo address generation also has been implemented in hardware circuitry.